package cn.nexd.app.config.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * Created by wangxu on 16/2/29.
 */
public class Expandable implements Parcelable {

    public static final Creator<Expandable> CREATOR = new Creator<Expandable>() {
        @Override
        public Expandable createFromParcel(Parcel in) {
            return new Expandable(in);
        }

        @Override
        public Expandable[] newArray(int size) {
            return new Expandable[size];
        }
    };
    private String cityName;
    private ArrayList<Mall> malls;

    public Expandable(String cityName, ArrayList<Mall> malls) {
        this.cityName = cityName;
        this.malls = malls;
    }

    public Expandable(Parcel in) {
        cityName = in.readString();
        malls = in.createTypedArrayList(Mall.CREATOR);
    }

    public Expandable() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(cityName);
        dest.writeTypedList(malls);
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public ArrayList<Mall> getMalls() {
        return malls;
    }

    public void setMalls(ArrayList<Mall> malls) {
        this.malls = malls;
    }
}
